package com.xjtu.se.homework.ops.feedback;

import com.xjtu.se.homework.common.Result;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping("/ops/feedback")
public class FeedbackAPI {
    @Resource
    private FeedBackService feedBackService;
    @PostMapping("/showAll")
    public Result queryFBs(@RequestBody  FeedBackDto dto){
        Map<String,Object> page =  feedBackService.getAllFbs(dto);
        return Result.success(page);
    }
    @PostMapping("/email")
    public Result sendEmail(@RequestBody EmailDto dto){
        return feedBackService.sendEmail(dto);
    }
}
